- 
                Notifications
    
You must be signed in to change notification settings  - Fork 237
 
Ensuring we produce a valid JSON in case of empty string and -nan #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…cy tracking value. recording min/max outside of hdr_histogram to avoid caps. increased per second rotated histogram precision
          Codecov ReportAttention: Patch coverage is  
 
 Additional details and impacted files@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
+ Coverage   64.53%   65.26%   +0.72%     
==========================================
  Files          21       21              
  Lines        4368     4445      +77     
==========================================
+ Hits         2819     2901      +82     
+ Misses       1549     1544       -5     ☔ View full report in Codecov by Sentry. 🚨 Try these New Features: 
  | 
    
| // to be retrocompatible | ||
| jsonhandler->write_obj("Latency","%.3f", avg_latency); | ||
| jsonhandler->write_obj("Average Latency","%.3f", avg_latency); | ||
| jsonhandler->write_obj("Accumulated Latency","%lld", m_total_latency / LATENCY_HDR_RESULTS_MULTIPLIER); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just a sum of all command latency experienced throughout the test? Is it more-or-less equivalent to Average Latency * Ops?
| * @return false if the value is larger than the highest_trackable_value and can't be recorded, | ||
| * true otherwise. | ||
| */ | ||
| bool hdr_record_value(struct hdr_histogram* h, int64_t value); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still being used anywhere? Can it be removed?
If not, and you're keeping it for compat purposes, should the method docs be updated to indicate it's deprecated or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still being used anywhere?
@DrEsteban it's coming from the original repo: https://github.com/HdrHistogram/HdrHistogram_c
I believe it's best to create an issue there and document this further on the function signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went ahead and did that: HdrHistogram/HdrHistogram_c#126
Please add details or clarifications as necessary.
We can reproduce easily with:
-nan,inf) #271To confirm the issue is fixed, we've added a test that previously generated bad JSON.
old output:
new output (valid json):